package org.example.diet_compass.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.example.diet_compass.domain.Banners;
import org.example.diet_compass.service.BannersService;
import org.example.diet_compass.mapper.BannersMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 86135
 * @description 针对表【banners(轮播图表)】的数据库操作Service实现
 * @createDate 2025-02-27 15:21:30
 */
@Service
public class BannersServiceImpl extends ServiceImpl<BannersMapper, Banners>
        implements BannersService {
    @Resource
    BannersMapper bannersMapper;

    @Override
    public List<Banners> getBanners(Integer type) {
        QueryWrapper<Banners> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("type", type);
        return bannersMapper.selectList(queryWrapper);
    }
}




